//
//  UIFactory.m
//  FoodHub
//
//  Created by 周杨 on 14/11/6.
//  Copyright (c) 2014年 zhouy. All rights reserved.
//

#import "UIFactory.h"

@implementation UIFactory

+(UIButton *) CreateUIButton:(NSString *) title{
    UIButton * btn=[UIButton buttonWithType:UIButtonTypeCustom ];//  [[UIButton alloc] initWithFrame:CGRectMake(0, 50, 100, 30)];
    
    //btnAc.frame = CGRectMake(10, 20, 80, 25);
    
    //[btnAc setImage:<#(UIImage *)#> forState:<#(UIControlState)#>];
    
    
    [btn.layer setMasksToBounds:true];
    [btn.layer setCornerRadius:8.0]; //设置矩圆角半径
    [btn.layer setBorderWidth:0.5];   //边框宽度
    [btn.layer setBorderColor:[UIColor HexString:@"#af4451"].CGColor];//边框颜色
    [btn.layer setBackgroundColor:[UIColor HexString:@"#db5565"].CGColor];
    
    
    
    btn.layer.shadowOffset=CGSizeZero;
    btn.titleLabel.font = [UIFont fontWithName:@"Verdana-Bold" size:14.0];
    
    
    [btn setTitle:@"确定" forState:UIControlStateNormal];
    [btn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    
    
    
    
    
    return btn;
}

@end
